//
//  FunnyBaseViewController.m
//  markmap
//
//  Created by 甘世清 on 2024/5/6.
//

#import "FunnyBaseViewController.h"
#import "FunnyPictureViewController.h"
@interface FunnyBaseViewController ()

@end

@implementation FunnyBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self SQ_uiViewForSelf];
}
-(void)SQ_uiViewForSelf{
    self.view.backgroundColor  = SQColor(@"#464646");
    self.tabBar.indicatorColor = SQColor(@"#E133FF");
    self.tabBar.indicatorCornerRadius = 2;
    self.tabBar.itemContentHorizontalCenter = NO;
    self.tabContentView.loadViewOfChildContollerWhileAppear = YES;
    self.tabBar.itemTitleSelectedFont = FONT_MEDIUM(20);
    self.tabBar.itemTitleFont = FONT_MEDIUM(16);
    self.tabBar.itemTitleColor = SQColor(@"#D3D3D3");
    self.tabBar.itemTitleSelectedColor = UIColor.whiteColor;
    self.tabBar.backgroundColor = UIColor.clearColor;
    [self.tabBar setItemContentHorizontalCenterAndMarginTop:50 spacing:0];
    [self.tabBar setIndicatorWidthFitTextAndMarginTop:40 marginBottom:5 widthAdditional:0 tapSwitchAnimated:YES];
    self.tabContentView.defaultSelectedTabIndex = 1;
    [self.tabContentView setContentScrollEnabled:YES tapSwitchAnimated:YES];
    self.tabContentView.backgroundColor = SQColor(@"#464646");
    [self setTabBarFrame:CGRectMake(0, TopHeight-50, SCREEN_WIDETH, 50)
        contentViewFrame:CGRectMake(0, TopHeight, SCREEN_WIDETH, SCREEN_HEIGHT-TopHeight)];
   
    NSArray * array = @[@"最新",@"推荐",@"最热",@"关注"];
    NSMutableArray * top = [[NSMutableArray alloc]init];
    for (int x = 0; x<array.count; x++) {
        FunnyPictureViewController * vc = [[FunnyPictureViewController alloc]init];
        vc.yp_tabItemTitle =  [array objectAtIndex:x];
        vc.type =[NSString stringWithFormat:@"%d",x];
        [top addObject:vc];
    }
    self.viewControllers = [[NSMutableArray alloc]initWithArray:top];
   
  
}

@end
